#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("find.in" , "r" , stdin);
	freopen("find.out" , "w" , stdout);
	int ans = 0 , n;
	cin >> n;
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	for(int i = 1 ; i <= n ; i++){
		int m;
		cin >> m;
		ans = ans ^ m;
	}
	cout << ans << endl;
	return 0;
}
